
public class Hit {

    private Ray ray;
    private double t;
    private Renderable object;
    private int recursionDepth;
    
    public Hit(Ray ray, Renderable object, int recursionDepth, double t){
    	this.ray = ray;
    	this.t = t;
    	this.object=object;
    	this.recursionDepth=recursionDepth;
    }
    
    public Renderable getObject() {
        return object;
    }

    public Ray getRay() {
        return ray;
    }
    
    public double getT() {
        return t;
    }
    
    public int getRecursionDepth(){
    	return recursionDepth;
    }
    
    public Vector getIntersectionPoint(){
    	return ray.getOrigin().addVectors((ray.getDirection().multiplyVectorByScalar(t)));
    }
}
